package com.kujie.access.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kujie.access.domain.po.ContractManagement;
import com.kujie.common.core.validate.EditGroup;
import com.kujie.common.excel.annotation.ExcelDictFormat;
import com.kujie.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 合同管理 VO
 *
 * @author check
 * @date 2025-05-26
 */
@Data
@AutoMapper(target = ContractManagement.class, reverseConvertGenerate = false)
public class ContractManagementVO implements Serializable {
    /**
     * id
     */
    @ExcelIgnore
    @NotNull(message = "id不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 合同编号
     */
    @ExcelProperty(value = "合同编号")
    private String contractUUID;

    /**
     * 合同名称
     */
    @ExcelProperty(value = "合同名称")
    private String contractName;

    /**
     * 合同租金标准
     */
    @ExcelProperty(value = "租金标准")
    private String contractRentalStandard;

    /**
     * 合同押金
     */
    @ExcelProperty(value = "押金")
    private String deposit;

    /**
     * 合同押金状态 （未缴纳 已缴纳 退还）
     */
    @ExcelProperty(value = "合同押金状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "deposit_status")
    private String depositStatus;

    /**
     * 合同起始日期
     */
    @ExcelProperty(value = "起始日期")
    @DateTimeFormat("yyyy/M/d")
    private Date contractCommencementDate;

    /**
     * 合同结束日期
     */
    @ExcelProperty(value = "结束日期")
    @DateTimeFormat("yyyy/M/d")
    private Date contractExpirationDate;

    /**
     * 甲方
     */
    @ExcelProperty(value = "甲方")
    private String partyA;

    /**
     * 乙方
     */
    @ExcelProperty(value = "乙方")
    private String partyB;

    /**
     * 合同状态（草稿、审核中、已驳回、已生效、执行中、已完成、终止、过期、作废、待签署、部分履行、暂停/冻结、续约中、归档）
     */
    @ExcelProperty(value = "合同状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "contract_status")
    private String contractStatus;

    /**
     * 合同附件
     */
    @ExcelIgnore
    private String contractAppendix;

    /**
     * 合同签订日期
     */
    @ExcelProperty(value = "签订日期")
    @DateTimeFormat("yyyy/M/d")
    private Date signDate;

    /**
     * 缴纳方式（一次性支付、分期支付、按进度支付、预付+尾款、后付）
     */
    @ExcelProperty(value = "缴纳方式", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "payment_method")
    private String paymentMethod;
}
